<?php
error_reporting(E_ALL^E_NOTICE);
	include "db.php";
	$table = "varformula";
        if(!($connection = @mysql_connect($hostname, $username, $password)))
	{
		die("Error: Cannot connect to database !!!");
	}		
	if (!(mysql_select_db($databaseName, $connection))) 
	{
		die("Error: Cannot select database name: $databaseName");
        }
        
            $id = 1;
            $transfer = $_REQUEST["transfer"];
            $insurance = $_REQUEST["insurance"];
            $tax = $_REQUEST["tax"];
            $rate = $_REQUEST["rate"];
            $machining = $_REQUEST["machining"];
            $profit = $_REQUEST["profit"];
            $sellPlus =$_REQUEST["sellplus"];
        
        $strSQL = "update $table set transfer=$transfer, insurance=$insurance, tax=$tax, rate=$rate, machining=$machining, profit=$profit, sellplus=$sellPlus where ID=$id";
        //echo $strSQL;
        mysql_query("set names 'utf8'");
        $resultUpdate = mysql_query($strSQL, $connection);
	
if($resultUpdate)
{
	$resultUpdate = "Ok";
}
/*else
	$resultUpdate = "Error";
//echo $result;*/
mysql_close($connection);
?>
